package com.free.api;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.free.annotation.IgnoreAuth;
import com.free.annotation.LoginUser;
import com.free.entity.UserEntity;
import com.free.utils.R;

/**
 * 
* @ClassName: ApiTestController 
* @Description: TODO(api测试接口) 
* @author wujie
* @email 602991693@qq.com 
* @date 2017年9月1日 上午9:56:33 
*
 */
@RestController
@RequestMapping("/api")
public class ApiTestController {
	/**
	 * 
	* @Title: userInfo 
	* @author: wujie
	* @email: 602991693@qq.com
	* @Description: TODO(获取用户信息) 
	* @param @param user
	* @param @return    设定文件 
	* @return R    返回类型 
	* @throws
	 */
	@GetMapping("userInfo")
	public R userInfo (@LoginUser UserEntity user){
		return R.ok().put("user", user);
	}
	@IgnoreAuth
	@GetMapping("notToken")
	public R notToken(){
		return R.ok().put("msg", "无需Token也能访问");
	}
}
